#include "LinkQueue.h"

void InitLinkQueue(LQueue *q)
{
    InitDCList(&q->list);
}

void QPush(LQueue *q, ElementType element)
{
    InsertDCListTail(&q->list, element);
}

void QPop(LQueue *q)
{
    RemoveHead(&q->list);
}

bool IsLQueueEmpty(LQueue *q)
{
    return q->list.dllist.len == 0;
}

ElementType *GetLQueueFront(LQueue *q)
{
    return FindHead(&q->list);
}

int GetQueueLen(LQueue *q)
{
    return q->list.dllist.len;
}
